package com.edward.mvpdemo.model;

import java.util.ArrayList;

/**
 * Created by Administrator on 2016/4/28.
 */
public class DataModelImpl implements IDataModel {

    @Override
    public void loadData(int start, OnLoadDataListener listener) {
        listener.onLoading();
        ArrayList<String> data = new ArrayList<>();

        if (start > 100){
            listener.onError("数据超出");
        }else{

            for (int i = start; i < start + 20; i++) {
                data.add("Data" + i);
            }

            listener.onSuccess(data);
        }

    }
}






